home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 5 / MACVOGL- / GETGP.C < prev    next >
C/C++ Source or Header  |  1992-07-19  |  478b  |  33 lines

  1. #include "vogl.h"
  2.  
  3. /*
  4.  * getgp
  5.  *
  6.  *    return the current (x, y, z) graphics position
  7.  */
  8. void
  9. getgp(x, y, z)
  10.     Coord    *x, *y, *z;
  11. {
  12.     *x = vdevice.cpW[V_X];
  13.     *y = vdevice.cpW[V_Y];
  14.     *z = vdevice.cpW[V_Z];
  15. }
  16.  
  17. /*
  18.  * getgpos
  19.  *
  20.  *    Get the current graphics position after transformation by
  21.  *    the current matrix.
  22.  */
  23. void
  24. getgpos(x, y, z, w)
  25.     Coord    *x, *y, *z, *w;
  26. {
  27.     *x = vdevice.cpWtrans[V_X];
  28.     *y = vdevice.cpWtrans[V_Y];
  29.     *z = vdevice.cpWtrans[V_Z];
  30.     *w = vdevice.cpWtrans[V_W];
  31. }
  32.  
  33.